Oracles used for testing graphical user interface (GUI) programs are requiredto take into consideration complicating factors such as variations in screenresolution or color scheme when comparing observed GUI elements to expected GUIelements. Researchers proposed fuzzy comparison rules and computationallyexpensive image processing techniques to tame the comparison process sinceotherwise the naive matching comparison would be too constraining andconsequently impractical. Alternatively, this paper proposes GUICop, a novelapproach with a supporting toolset that takes (1) a GUI program and (2)user-defined GUI specifications characterizing the rendering behavior of theGUI elements, and checks whether the execution traces of the program satisfythe specifications. GUICop comprises the following: 1) a GUI SpecificationLanguage; 2) a Driver; 3) Instrumented GUI Libraries; 4) a Solver; and 5) aCode Weaver. The user defines the specifications of the subject GUI programusing the GUI Specification Language. The Driver traverses the GUI structure ofthe program and generates events that drive its execution. The Instrumented GUILibraries capture the GUI execution trace, i.e., information about thepositions and visibility of the GUI elements. And the Solver, enabled by codeinjected by the Code Weaver, checks whether the traces satisfy thespecifications. GUICop was successfully evaluated using four open source GUIapplications that included eight defects, namely, Jajuk, Gason, JEdit, andTerpPaint.
展开▼